# -*- coding: utf-8-*- 
import datetime
from openerp import models
from openerp.osv import osv, fields, orm
"""
1.新建市区，和县区表方便在呼叫中心填写订单时地址的填写
"""
class all_city(osv.osv):
		_name='all.city'
		_rec_name='city_name'
		_columns = {
			'city_name':fields.char(u'城市名称',size=64 ,required=True),
			'province_name':fields.many2one('res.country.state',u'省名称',domain="[('country_id.name','=','中国')]",required=True),
			
		}
		_defaults={
			#'province_name':lambda self, cr, uid, c:c.get('province',1),
		}
		
class all_country(osv.osv):
		_name='all.country'
		_rec_name='county_name'
		_columns = {
			'city_name':fields.many2one('all.city',u'城市名称',required=True),
			'county_name':fields.char(u'县名称',size=64,required=True),
			'description':fields.char(u'描述',size=64)
		}